home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10381 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: skivs.ski.org!usenet
  2. From: gt@ns.oon.or.jp (Gemini Thunder)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: fflush and Visual C++
  5. Date: Sun, 17 Mar 1996 03:18:49 GMT
  6. Organization: Smith-Kettlewell Eye Research Institute
  7. Message-ID: <4ig0cq$gkg@skivs.ski.org>
  8. References: <4idhv5$dnv@news.mhv.net> <314b173b.71056173@nntp.ix.netcom.com>
  9. NNTP-Posting-Host: oonserv.oon.or.jp
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. miker3@ix.netcom.com (Mike Rubenstein) wrote:
  13.  
  14. >Vinny.Bedus@bbs.mhv.net (Vinny Bedus) wrote:
  15.  
  16. >> Can someone please tell me why when fflush function is used in Visual C 
  17. >> under a dos box it doesn't work?  I have no problems with turbo c for win 
  18. >> but anything else and it doesn't flush the stdin buffer.
  19. >>  any ans??????????????
  20.  
  21. >Perhaps because Visual C implements fflush() correctly.  fflush() does
  22. >not flush input buffers.  fflush() with stdin as an argument results
  23. >in undefined behavior.
  24.  
  25. >Michael M Rubenstein
  26.  
  27. Could you explain why fflush(stdin) results in undefined behavior?
  28. I have been using this construct, (apparently) unaware of this.
  29.  
  30.